import java.math.BigDecimal;
import java.text.NumberFormat;

public class Test04 {
	public static void main(String[] args) {
//		Test04 t = new Test04();
		System.out.println(new BigDecimal(1.2));
		BigDecimal a = new BigDecimal("1.2");
		BigDecimal b = new BigDecimal("2.2");
		BigDecimal c = a.add(b).add(b);
		System.out.println(a+" "+b+" "+c);
		System.out.println(new BigDecimal(1.2).toString().length());
		
		double d = 5.015;
		System.out.println(d*100);
		System.out.println(Math.round(d*100)/100.0);
		System.out.println(d);
		
		
	    NumberFormat nf33 = NumberFormat.getInstance();
	    nf33.setMaximumFractionDigits(3);
	    nf33.setMinimumFractionDigits(3);
		float e = -132373.16f;
		System.out.println(e);
		System.out.println(nf33.format(e));
		
		java.text.DecimalFormat   df   =new   java.text.DecimalFormat("#.00");
		
		System.out.println(df.format(e));
		
//		double d = 3.1415926;

		System.out.println(20313*0.01F);
		
		System.out.println(new BigDecimal("1.2000").stripTrailingZeros().toPlainString());
		System.out.println(new BigDecimal("1.2").toString());
		
		String result = String.format("%.3f",e);
		System.out.println(result);
	}
}